<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>易夫森管理系统</title>
		<link rel="stylesheet" type="text/css" href="css/yfs.css">
	</head>

	<body>
		<table width="900" align="center" height="100%" border="0" margin="0"
			padding="0" cellspacing="0" cellpadding="0">
			<tr>
				<td valign="top" width="100%" height="30" colspan="6">
					<img src="images/logo.jpg">
				</td>
			</tr>
			<tr valign="top">
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
				<td align="left" width="30px">
					<jsp:include page="left.jsp"></jsp:include>
				</td>
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
				<td valign="top" width="750">
					<form action="<%=path%>/prefixconf" method="post">
						<table style="font-size: 12px;">
							<tr>
								<td>
									网站名称
								</td>
								<td>
									<select name="site">
										<c:forEach items="${sitelist}" var="kl">
											<option value="${kl.id}">
												${kl.site_ch}
											</option>
										</c:forEach>
									</select>
								</td>
							</tr>
							<!-- 
					    	<tr><td>host信息</td><td><input type="text" name="host"/></td></tr>
					    	 -->

							<tr>
								<td>
									网页前缀正则
								</td>
								<td>
									<input type="text" name="prefix" />
								</td>
							</tr>
							<tr>
								<td>
									待预处理url正则
								</td>
								<td>
									<input type="text" name="bbsRegex" />
								</td>
							</tr>
							<tr>
								<td>
									网站编码
								</td>
								<td>
									<select name="encode" style="width: 155px;">
										<option value=gb2312>
											gb2312
										</option>
										<option value=UTF-8>
											UTF-8
										</option>
									</select>
								</td>
							</tr>
							<tr>
								<td>
									结构化正则
								</td>
								<td>
									<input type="text" name="structRegex" />
								</td>
							</tr>
							<tr>
								<td>
									url前部分正则
								</td>
								<td>
									<input type="text" name="urlPrefix_regex" />
								</td>
							</tr>
							<tr>
								<td>
									起始url
								</td>
								<td>
									<input type="text" name="beginUrl" />
								</td>
							</tr>
							<tr>
								<td>
									网站类型
								</td>
								<td>
									<select name="type" style="width: 155px;">
										<option value=0>
											论坛网站
										</option>
										<option value=1>
											非论坛网站
										</option>
									</select>
								</td>
							</tr>
							<tr>
								<td>
									存储文件夹
								</td>
								<td>
									<input type="text" name="filename" />
								</td>
							</tr>
							<tr>
								<td colspan="2" align="center">
									<input type="submit" value="提交" />
								</td>
							</tr>

						</table>
					</form>
					<span>${msg}</span>
					<table align="left">
						<!-- <th>网站名称</th><th>前缀</th><th>操作</th> -->
						<thead style="color: red">
							<b>已经添加配置</b>
						</thead>
						<tr>
							<th>
								网站名称
							</th>
							<th>
								操作
							</th>
						</tr>
						<c:forEach items="${prefixList}" var="prefix">
							<tr>
								<td>
									${prefix.site}
								</td>
								<td>
									<a
										href="<%=path%>/deletePrefix?id=${prefix.id}&&prefixId=${prefix.prefixId}">删除</a>
								</td>
							</tr>
						</c:forEach>
					</table>
				</td>
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
			</tr>
		</table>
	</body>
</html>
